@use '@scss/common' as *;

.blogCard {
  display: block;
  text-decoration: none;
  position: relative;

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--theme-text);
    z-index: 1;
    transition: width 0.3s;
  }

  &:hover {
    &::after {
      width: 100%;
    }

    .scanline {
      opacity: 1;
    }
  }
}

.scanline {
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
  border-block: 1px solid var(--theme-border-color);
}

.contentWrapper {
  display: flex;

  @include small-break {
    flex-direction: column;
  }
}

.title {
  display: block;
  @include h5;

  & {
    margin-top: 0 !important;
    text-decoration: none;
  }
}

.media {
  max-width: 50%;
  position: relative;

  @include small-break {
    width: 100%;
    padding: 0;
    margin-bottom: 2rem;
    max-width: 100%;
  }
}
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.5rem;
  opacity: 0.5;

  @include small-break {
    margin-bottom: 0.6rem;
  }

  time {
    text-wrap: nowrap;
    @include small;
  }

  p {
    margin: 0;
    text-wrap: nowrap;
    @include small;
  }
}

.mediaLink {
  flex-shrink: 0;
  flex-grow: 0;
}

.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  width: 50%;
  text-decoration: none;
  padding-left: 2rem;
  padding-right: 2rem;

  @include small-break {
    width: 100%;
    padding: 0;
  }
}

.minimal {
  border: 1px solid var(--theme-border-color);
  .media {
    max-width: 25%;
  }

  .title {
    margin-bottom: 0;
    @include body;
    & {
      font-weight: 500;
    }
  }

  .scanline {
    border: none;
  }
}
